#ifndef _WTL_AVATAR_CONTROL_INC_
#define _WTL_AVATAR_CONTROL_INC_

namespace cm {
namespace Windows {

class CAvatarCtrl : public CWindowImpl< CAvatarCtrl,CButton>
{
public:
	CAvatarCtrl();
public:
	BEGIN_MSG_MAP(CAvatarCtrl)
		MESSAGE_HANDLER(WM_PAINT, OnPaint)
		MESSAGE_HANDLER(WM_MOUSEMOVE,OnMouseMove)
		MESSAGE_HANDLER(WM_MOUSEHOVER,OnMouseHover)
		MESSAGE_HANDLER(WM_MOUSELEAVE,OnMouseLeave)
		MESSAGE_HANDLER(WM_TIMER,OnTimer)
	END_MSG_MAP()
private:
	LRESULT OnPaint(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
	LRESULT OnMouseMove(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/);
	LRESULT OnMouseHover(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/);
	LRESULT OnMouseLeave(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/);
	LRESULT OnTimer(UINT /*uMsg*/, WPARAM wParam, LPARAM /*lParam*/, BOOL& /*bHandled*/);
public:
	bool LoadAvatarPicture(LPCTSTR szPath);
private:
	bool		m_Init;
	CRect		m_InitialRect;
	ATL::CImage	m_Image;
};

}}

#endif //_WTL_AVATAR_CONTROL_INC_